package Test;

import java.util.ArrayList;

import org.junit.Test;

import DBLayer.DBRegistrationSchema;
import ModelLayer.RegistrationSchema;

public class TestDBRegistrationSchema
{
	DBRegistrationSchema dbrs = new DBRegistrationSchema();
	ArrayList<RegistrationSchema> rslist = dbrs.getAllRegistrationSchemas(false);

	@Test
	public void testGetAllRegistrationSchema() {
	    System.out.println("\nRegistrationSchema size : " + rslist.size() + "\n");
	}

	@Test
	public void testSearchRegistrationSchemaID() {
		int id = 1;
		while(id <= rslist.size())
		{
			RegistrationSchema rs = dbrs.searchRegistrationSchemaID(id, false);
			System.out.println("RegistrationSchemaID    : " + rs.getRegistrationSchemaID());
			System.out.println("Registration            : " + rs.getRegistration());
			System.out.println("Right                   : " + rs.getPmRight());
			System.out.println("Prompt                  : " + rs.getPmPrompt());
			System.out.println("Wrong                   : " + rs.getPmWrong());
			System.out.println("ResponseListID          : " + rs.getResponseList().getResponseListID());
			System.out.println("-------------------------------------------------");
			id++;
		}
	}
}
